<%@ page import="com.the8thfold.anton.ant.JobStatus; org.apache.tools.ant.Target" contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>View Job</title>
    <meta name="layout" content="main" />

</head>
<body>

<div>
    <h1>Job: ${job.name}</h1>
    <hr/>
    <h2>Choose properties to override</h2>
    <br/>
    <g:form name="propertySelectForm" controller="job" action="addProperty" id="${job.jobId}">
        <div class="css_right toolbar">
            <a class="btn-text" href="${createLink(controller: 'job', action: 'view', id: job.jobId)}">Cancel</a>
            <g:submitButton class="btn-text" name="submit" value="Add properties"></g:submitButton>
        </div>
        <br/>
        <br/>
        <br/>
        <hr/>
        <br/>
        <table>
            <tr>
                <th></th>
                <th>Name</th>
                <th>Default Value</th>
            </tr>
            <g:each in="${projectProperties.sort()}" status="propertiesIndex" var="propertyItem">
                <tr class="${propertiesIndex%2 ? 'odd' : 'even'}">
                    <g:hiddenField name="jobpropvalue.${propertyItem.key}" value="${propertyItem.value}"/>
                    <td><input type="checkbox" name="jobprop.${propertyItem.key}" /></td>
                    <td>${propertyItem.key}</td>
                    <td>${propertyItem.value}</td>
                </tr>
            </g:each>
        </table>
        <br/>
        <hr/>
        <br/>
        <div class="css_right toolbar">
            <a class="btn-text" href="${createLink(controller: 'job', action: 'view', id: job.jobId)}">Cancel</a>
            <g:submitButton class="btn-text" name="submit" value="Add properties"></g:submitButton>
        </div>
    </g:form>
    <br/>

</div>
<br/>
<br/>
<br/>
</body>
</html>